package com.fit.util;

import com.fit.interfaces.User;
import com.fit.service.Users;

public class Security {

	public static User authenticate(String userName,String password, Users users ){
		User login = null;
		
		login = users.retriveSingleUser(userName);
		if(login == null) return null;
		
		if(login.getPassword().equals(password)){
			return login;
		}
		
		return null;
	}
}
